<!DOCTYPE html>
<html lang="zh">
<head>
<title>促销规则新增或编辑 | OMS</title>
<meta charset="utf-8" />

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="Thu, 19 Nov 1900 08:52:00 GMT" />
<!-- 加载 bootstrap 样式-->
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-ui-1.10.4.custom/css/ui-lightness/jquery-ui-1.10.4.custom.min.css" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/font-awesome/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/bootstrap/css/bootstrap.min.css" />

<!-- 加载本页需要的三方插件样式 -->
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-notific8/jquery.notific8.min.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/DataTables/media/css/jquery.dataTables.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/DataTables/extensions/TableTools/css/dataTables.tableTools.min.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/DataTables/media/css/dataTables.bootstrap.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-tablesorter/themes/blue/style-custom.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-bootstrap-wizard/custom.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/jquery-steps/css/jquery.steps.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/animate.css/animate.css" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/iCheck/skins/all.css" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css">

<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/select2/select2-madmin.css">
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/bootstrap-select/bootstrap-select.min.css">

<link type="text/css" rel="stylesheet" href="/Apollo/madmin/vendors/bootstrap-daterangepicker/daterangepicker-bs3.css">
<!-- 加载主题风格样式 -->
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/css/themes/style1/orange-blue.css" class="default-style" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/css/themes/style1/orange-blue.css" id="theme-change"
    class="style-change color-change" />
<link type="text/css" rel="stylesheet" href="/Apollo/madmin/css/style-responsive.css" />
<link type="text/css" rel="stylesheet" href="/css/tooltip.css" />
</head>
<style>
body {
    background-color: #FFF;
}
.input-xsmall {
    width: 130px !important;
}
</style>
<body>
    <div class="page-content" style="widht: 98%;">
        <form id="ruleForm" role="form" class="form-horizontal">
            <div class="row">
                <div class="col-md-12">
                    <div class="form-group">
                        <label class="col-md-3 col-sm-3 control-label">规则名称&nbsp;<span class="require">*</span></label>
                        <div class="col-md-7 col-sm-7">
                            <input id="ruleId" name="ruleId" type="hidden" /> <input id="ruleName" name="ruleName" type="text"
                                placeholder="请输入规则名称" class="form-control" maxlength="30" required/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 col-sm-3 control-label">参加店铺&nbsp;<span class="require">*</span></label>
                        <div class="col-md-7 col-sm-7">
                            <select id="projectShopList" name="projectShopList" required>
                                <option value="">请选择店铺</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 col-sm-3 control-label">促销时间&nbsp;<span class="require">*</span></label>
                        <div class="col-md-7 col-sm-7">
                            <select id="selectCountingDateType" width="50px" data-style="btn-white" data-width="100px"
                                class="selectpicker form-control">
                                <option class="selectCountingDateType" id="" value="" selected>请选择</option>
                                <option class="selectCountingDateType" id="paymentTime" value="0">付款时间</option>
                                <option class="selectCountingDateType" id="orderTime" value="1">拍单时间</option>
                            </select> &nbsp;介于&nbsp;
                            <div class="btn btn-default reportrange">
                                <i class="fa fa-calendar"></i>&nbsp;&nbsp;<span></span>&nbsp;&nbsp;<i class="fa fa-angle-down"></i> <input
                                    type="hidden" id="datestart" name="datestart" /> <input type="hidden" id="dateend" name="dateend" />
                            </div>
                            <span style="display:none;">
                            &nbsp;的&nbsp; <select id="selectEachDaySet" data-style="btn-white" data-width="80px"
                                class="selectpicker form-control">
                                <option id="wholeDay" class="selectEachDaySet" value="n" selected>全天</option>
                                <option id="eachDay" class="selectEachDaySet" value="y">每天</option>
                            </select>
                            </span>
                        </div>
                    </div>
                    <div class="form-group" id="everydayset">
                        <label class="col-md-3 col-sm-3 control-label"></label>
                        <div class="col-md-7 col-sm-7 form-inline">
                            每天的有效时间 &nbsp;从&nbsp; <input type="text" id="txtEachDayTimeStart" name="eachDayTimeStart" class="form-control"
                                disabled /> &nbsp;到&nbsp; <input type="text" id="txtEachDayTimeEnd" name="eachDayTimeEnd" class="form-control"
                                disabled />
                        </div>
                    </div>
                    <div class="form-group hidden">
                        <label class="col-md-3 col-sm-3 control-label">规则描述<span class="require">&nbsp;</span></label>
                        <div class="col-md-7 col-sm-7">
                            <input id="ruleDescription" name="ruleDescription" class="form-control" style="resize: none;" maxlength="80"></input>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 col-sm-3 control-label">其它设置&nbsp;<span class="require" style="visibility: hidden;">*</span></label>
                        <div class="col-md-7 col-sm-7">
                            <div class="checkbox">
                                <label> <input id="chkIsEnable" type="checkbox"/>&nbsp; 启用规则
                                </label> <label style="display:none;"> <input id="chkIsDuplicatedIdEnable" type="checkbox"/>&nbsp; 会员可重复参与
                                </label> <label> <input id="chkIsGroupEnvolve" type="checkbox" />&nbsp; 组合商品参与
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <hr />
        <div class="row">
            <div class="col-md-2"></div>
            <div class="col-md-8">
                <ul id="myTab" class="nav nav-tabs ul-edit responsive">
                    <li class="active" id="ruleSetArea" name="ruleSetArea"><a id="ruleSetArea" href="#ruleSet" data-toggle="tab"><span
                            class="fa fa-puzzle-piece"></span>&nbsp;规则设置</a></li>
                    <li id="constrainGoodsTab"><a href="#constrainGoodsMng" data-toggle="tab"><span class="fa fa-crosshairs"></span>&nbsp;限定商品</a>
                    <li><a href="#giftMng" data-toggle="tab"><span class="fa fa-gift"></span>&nbsp;赠品管理</a></li>
                    </li>
                </ul>
                <div id="myTabContent" class="tab-content">
                    <div id="giftMng" class="tab-pane fade">
                        <div class="row">
                            <div class="col-md-12 form-inline top">
                                <div class="form-group">
                                    <div class="checkbox">
                                        <label> <input id="set" value="setSend" type="radio" checked name="giftSendType"
                                            class="giftSendType" />&nbsp; 整组赠送赠品
                                        </label> <label> <input id="priority" value="prioritySend" type="radio" name="giftSendType"
                                            class="giftSendType" />&nbsp; 按优先级赠送赠品（数字越小，优先级越高）
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <hr />
                        <div class="row">
                            <div class="col-lg-7 col-xs-7 col-sm-7 col-md-7 col-sm-7">
                                <span class="input-group-btn">
                                    <button id="btnEmptyGift" type="button" class="btn btn-default">
                                        <i class="fa fa-trash-o"></i> &nbsp 清空赠品
                                    </button>
                                </span>
                            </div>
                            <div class="col-lg-5 col-xs-5 col-sm-5 col-md-5">
                                <div class="input-group">
                                    <input id="goodsSkuCodeList" type="text" placeholder="输入规格商家编码,点击“+”" class="form-control" /> <span
                                        class="input-group-btn">
                                        <button id="btnQuickAddGift" type="button" class="btn btn-primary">
                                            <i class="fa fa-plus"></i>
                                        </button>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="table-responsive col-sm-12">
                                <table id="giftTable" class="table table-hover table-striped table-bordered table-advanced" cellspacing="0">
                                    <thead>
                                        <tr>
                                            <th width="10%" colValue="operation">操作</th>
                                            <th width="15%" colValue="relGoodsCode">商品商家编码</th>
                                            <th width="15%" colValue="relGoodsName">商品名称</th>
                                            <th width="15%" colValue="relGoodsSkuCode">规格商家编码</th>
                                            <th width="15%" colValue="relGoodsSkuName">规格名称</th>
                                            <th width="10%" colValue="presentAmount">备货数</th>
                                            <th width="10%" colValue="defaultPresentNum">赠送数</th>
                                            <th width="10%" colValue="priority">优先级</th>
                                            <th width="" colValue="relGoodsId"></th>
                                            <th width="" colValue="relGoodsSkuId"></th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div id="ruleSet" class="tab-pane fade in active">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="col-md-2 control-label">赠送方式<span class="require"></span></label>
                                    <div class="col-md-10">
                                        <div class="checkbox">
                                            <label> <input id="buySend" type="radio" name="sendType" value="buySend"/>&nbsp; 买就送
                                            </label> <label> <input id="fullSend" type="radio" name="sendType" value="fullSend"/>&nbsp; 满就送
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <hr />
                        <div class="panel panel-body">
                            <!-- 买就送 -->
                            <div class="row sendTypeContent hidden" id="buySendContent">
                                <div class="col-md-12 form-inline">
                                    &nbsp;购买 &nbsp; <select id="buyPurchaseType" data-style="btn-white" data-width="100px"
                                        class="selectpicker form-control purchaseType" required>
                                        <option class="buyPurchaseType" id="constrainGoods" value="constrainGoods" selected>限定商品</option>
                                        <option class="buyPurchaseType" id="anyGoods" value="anyGoods">任意商品</option>
                                    </select> &nbsp;的&nbsp; <select id="buyPurchaseUnitType" data-style="btn-white" data-width="100px"
                                        class="selectpicker form-control" required>
                                        <option id="unitPiece" value="piece" selected>件数</option>
                                        <option id="unitKind" value="kind">种类数</option>
                                    </select> &nbsp;满&nbsp; <input type="text" id="buyPurchaseNum" name="buyPurchaseNum" class="form-control input-xsmall text-right"
                                        required value="1"/> &nbsp;, 即赠送赠品。&nbsp; <label id="multiSendGiftLabel"> <input id="buyRecurSend" type="checkbox" />&nbsp;
                                        多买多送
                                    </label>
                                </div>
                            </div>

                            <!-- 满就送 -->
                            <div class="row sendTypeContent hidden" id="fullSendContent">
                                <div class="col-md-12 form-inline">
                                    购买 <select id="fullPurchaseType" data-style="btn-white" data-width="100px" class="selectpicker form-control purchaseType" required>
                                        <option class="fullPurchaseType" id="constrainGoods" value="constrainGoods" >限定商品</option>
                                        <option class="fullPurchaseType" id="anyGoods" value="anyGoods" selected>任意商品</option>
                                    </select> &nbsp;的金额满&nbsp; <input type="text" id="fullPurchaseNum" name="fullPurchaseNum"
                                        class="form-control  input-xsmall text-right" required/> &nbsp;元，即赠送赠品。&nbsp;
                                    <div class="checkbox">
                                        <label> <input id="fullRecurSend" type="checkbox" />&nbsp; 多买多送
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="constrainGoodsMng" class="tab-pane fade">
                        <div class="row">
                            <div class="col-lg-2 col-xs-2 col-sm-2 col-md-2">
                                <span class="input-group-btn">
                                    <button id="btnEmptyConstrainGoods" type="button" class="btn btn-default">
                                        <i class="fa fa-trash-o"></i> &nbsp 清空限定商品
                                    </button>
                                </span>
                            </div>
                            <div class="col-lg-5 col-xs-5 col-sm-5 col-md-5"></div>
                            <div class="col-lg-5 col-xs-5 col-sm-5 col-md-5">
                                <div class="input-group">
                                    <input id="goodsSkuCodeList4ConstrainGoods" type="text" placeholder="输入规格商家编码,点击“+”" class="form-control" /> <span
                                        class="input-group-btn">
                                        <button id="btnQuickAddConstrainGoods" type="button" class="btn btn-primary">
                                            <i class="fa fa-plus"></i>
                                        </button>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="table-responsive col-sm-12">
                                <table id="constrainGoodsTable"
                                    class="table table-hover table-striped table-bordered table-advanced tb-sticky-header" cellspacing="0">
                                    <thead>
                                        <tr>
                                            <th width="10%" colValue="operation">操作</th>
                                            <th width="20%" colValue="relGoodsCode">商品商家编码</th>
                                            <th width="20%" colValue="relGoodsName">商品名称</th>
                                            <th width="20%" colValue="relGoodsSkuCode">规格商家编码</th>
                                            <th width="20%" colValue="relGoodsSkuName">规格名称</th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div class="spinner demo" style="display: none;">
        <div class="center">
            <div class="bouncywrap">
                <div class="dotcon dc1">
                    <div class="dot"></div>
                </div>
                <div class="dotcon dc2">
                    <div class="dot"></div>
                </div>
                <div class="dotcon dc3">
                    <div class="dot"></div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 编辑窗口 -->
    <!-- ====================================== modal窗口区 ===================================== -->
    <!--END CONTENT -->
    <!-- 加载 jquery js-->
    <script src="/Apollo/madmin/js/jquery-1.10.2.min.js"></script>
    <script src="/Apollo/madmin/js/jquery-migrate-1.2.1.min.js"></script>
    <script src="/Apollo/madmin/js/jquery-ui.js"></script>

    <!-- 加载 bootstrap 和三方插件 js -->
    <script src="/Apollo/madmin/vendors/bootstrap/js/bootstrap.min.js"></script>
    <script src="/Apollo/madmin/vendors/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js"></script>
    <script src="/Apollo/madmin/js/html5shiv.js"></script>
    <script src="/Apollo/madmin/js/respond.min.js"></script>
    <script src="/Apollo/madmin/vendors/jquery-cookie/jquery.cookie.js"></script>
    <script src="/Apollo/madmin/vendors/iCheck/icheck.min.js"></script>
    <script src="/Apollo/madmin/vendors/iCheck/custom.min.js"></script>
    <script src="/Apollo/madmin/vendors/jquery-notific8/jquery.notific8.min.js"></script>
    <script src="/Apollo/madmin/vendors/jquery-pace/pace.min.js"></script>
    <script src="/Apollo/madmin/vendors/holder/holder.js"></script>
    <script src="/Apollo/madmin/vendors/responsive-tabs/responsive-tabs.js"></script>
    <script src="/Apollo/madmin/vendors/moment/moment.js"></script>
    <script src="/Apollo/madmin/vendors/bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
    <script src="/Apollo/madmin/vendors/DataTables/media/js/jquery.dataTables.js"></script>
    <script src="/Apollo/madmin/vendors/DataTables/media/js/dataTables.bootstrap.js"></script>
    <script src="/Apollo/madmin/vendors/DataTables/extensions/TableTools/js/dataTables.tableTools.min.js"></script>
    <script src="/Apollo/madmin/vendors/jquery-tablesorter/jquery.tablesorter.js"></script>
    <script src="/Apollo/madmin/js/table-advanced.js"></script>

    <script src="/Apollo/madmin/vendors/jquery-validate/jquery.validate.min.js"></script>
    <script src="/Apollo/madmin/vendors/jquery-validate/message_zh.js"></script>
    <script src="/Apollo/madmin/vendors/bootstrap-maxlength.js"></script>
    <script src="/Apollo/madmin/vendors/jquery-inputmask/jquery.inputmask.bundle.min.js"></script>



    <!-- 加载本页面对应的js -->
    <script src="/Apollo/madmin/vendors/select2/select2.min.js"></script>
    <script src="/Apollo/madmin/vendors/bootstrap-select/bootstrap-select.min.js"></script>
    <script src="/Apollo/madmin/vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
    <script src="/Apollo/madmin/vendors/jsrender/jsrender.min.js"></script>

    <script src="salespromotionruleedit.js"></script>
    <script src="/views/static/js/export.js"></script>
    <script src="/views/static/js/form.js"></script>
    <script src="/views/static/js/jquery.validate.extend.js"></script>
</body>
</html>